// src/router/index.js
//createRouter：创建路由对象 来源vue-router
import { createRouter, createWebHashHistory } from 'vue-router';
import longin from '../components/samples/login.vue';
import index from '../components/index.vue';
import status from "../components/equipment-management/status.vue";
import shop from "../components/shop/shop.vue";
import embarkation from "@/embarkation/embarkation.vue";

//页面配置
const routes = [
    { path: '/', component: longin },
    { path: '/index', component: index },
    { path: '/status', component: status },
    { path: '/shop', component: shop},
    { path: '/embarkation', component: embarkation },
];

const router = createRouter({
    //createWebHashHistory :#  a标签锚点连接
    //createWebHistory :后台需要重定向 否则出现404  H5:pushState
    history: createWebHashHistory(),
    routes
});

//导出
export default router;
